<% if @shared_provinces.size > 0 %>
<h1>Listado de Provincias</h1>

<table class="paginated_table sorted_table">
  <thead>
  <tr>
    <th>Nombre</th>
    <th>Departamento</th>
    <th>Acciones</th>
  </tr>

  </thead>
  <tbody>
<% @shared_provinces.each do |shared_province| %>
  <tr>
    <td><%= shared_province.name %></td>
    <td>
      <%if !shared_province.department.blank? %>
      <%= shared_province.obj_department.name %>
      <%end%>
    </td>
    <td>
      <%= link_to image_tag("navi/search-16-ns.png", :border => 0,:title=>"Mostrar"), shared_province%>
      <% if (user_signed_in? && ([2].include?(current_user.role))) %>
    <%= link_to image_tag("navi/pencil-16-ns.png", :border => 0,:title=>"Editar"), edit_shared_province_path(shared_province) %>
    <%= link_to image_tag("navi/cross-16-ns.png", :border => 0,:title=>"Eliminar"), shared_province, :confirm => 'Esta Seguro?', :method => :delete %>
      <%end%>
      
    </td>
  </tr>
<% end %>
  </tbody>
</table>
<% else %>
  <p>Ninguna Provincia Encontrada</p>
<% end %>
<br />
<% if (user_signed_in? && ([2].include?(current_user.role))) %>
<%= link_to 'Nueva Provincia', new_shared_province_path %>
<%end%>